import request from '@/utils/zyrequest'
import { getToken } from '@/utils/auth'

export default {
    // 查询所有中药材资源信息
    zyMedicinalView(mName, page, size){
        return request({
            url: '/item/medicinalInf/medicinalinflist',
            method: 'get',
            params: {
                mName: `${mName}`,
                page: `${page}`,
                size: `${size}`
            },
            headers: {
                'token': getToken()
            }
        })
    },

    // 查询单个药材信息
    zyMedicinalOneView(id){
        return request({
            url: '/item/medicinalInf/medicinalinfdetails',
            method: 'get',
            params: {
                id: `${id}`
            },
            headers: {
                'token': getToken()
            } 
        })
    }
}
